import React from 'react'
import { Routes, Route, Link } from 'react-router-dom'
import Home from './pages/Home'
import About from './pages/About'
export default function App() {
  return (
    <div>
      <Link to="/home">首页</Link>
      <Link to="/about">关于</Link>
      <hr />
      {/* 注意: 前端路由规则配置代码写在哪里,未来要切换的视图就渲染在哪里 */}
      <Routes>
        <Route path="/home" element={<Home></Home>}></Route>
        <Route path="/about" element={<About></About>}></Route>
      </Routes>
      <hr />
    </div>
  )
}
